Descriptives across the categories (Political_True and _False AND COVID_True and _False)

df_political %>% group_by(Category, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 9
## # Groups:   Category [4]
##    Category       measurement  mean     SD count     se median   min   max
##    <chr>          <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
##  1 COVID_Fake     Acc_Abs     51.0  12.6      60 1.63    51.5  14.3  77.1 
##  2 COVID_Fake     Acc          3.22  0.500    60 0.0646   3.16  2.08  4.88
##  3 COVID_Fake     Fam          2.15  0.267    60 0.0345   2.08  1.52  2.84
##  4 COVID_True     Acc_Abs     66.7  11.8      98 1.19    67.8  30.2  84.8 
##  5 COVID_True     Acc          3.93  0.484    98 0.0489   3.99  2.6   4.81
##  6 COVID_True     Fam          2.51  0.449    98 0.0453   2.47  1.58  4.12
##  7 Political_Fake Acc_Abs     57.7  13.4     140 1.13    58.8  21.9  85.4 
##  8 Political_Fake Acc          2.96  0.536   140 0.0453   2.90  1.8   4.42
##  9 Political_Fake Fam          2.03  0.305   140 0.0258   2.02  1.29  3.51
## 10 Political_True Acc_Abs     63.1  12.5     152 1.01    64.9  25.7  88.2 
## 11 Political_True Acc          3.79  0.505   152 0.0410   3.82  2.14  4.82
## 12 Political_True Fam          2.42  0.414   152 0.0336   2.33  1.7   3.61
# Basic histogram Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items")

# Basic histogram Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "Grouped by all categories, collapsed acorss political leaning") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news") + facet_wrap(~Category)

# Basic histogram Relative Accuracy
df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: not at all; 6 extremely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Descriptives across the _True only

df_political_true %>% group_by(Category, political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 10
## # Groups:   Category, political_leaning [4]
##    Category political_leani… measurement  mean     SD count     se median
##    <chr>    <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl>
##  1 COVID_T… Democrat         Acc_Abs     70.2  10.2      49 1.45    72.9 
##  2 COVID_T… Democrat         Acc          4.13  0.443    49 0.0633   4.21
##  3 COVID_T… Democrat         Fam          2.62  0.469    49 0.0670   2.53
##  4 COVID_T… Republican       Acc_Abs     63.2  12.3      49 1.76    64.4 
##  5 COVID_T… Republican       Acc          3.73  0.445    49 0.0635   3.76
##  6 COVID_T… Republican       Fam          2.41  0.405    49 0.0579   2.41
##  7 Politic… Democrat         Acc_Abs     66.2  11.6      76 1.33    68.5 
##  8 Politic… Democrat         Acc          3.94  0.459    76 0.0526   3.98
##  9 Politic… Democrat         Fam          2.45  0.458    76 0.0526   2.3 
## 10 Politic… Republican       Acc_Abs     60.0  12.6      76 1.45    58.2 
## 11 Politic… Republican       Acc          3.65  0.512    76 0.0587   3.61
## 12 Politic… Republican       Fam          2.39  0.364    76 0.0418   2.34
## # … with 2 more variables: min <dbl>, max <dbl>
# Basic histogram Absolute Accuracy
df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _True only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _True only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Descriptives across the _False only

df_political_false %>% group_by(Category, political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 10
## # Groups:   Category, political_leaning [4]
##    Category political_leani… measurement  mean     SD count     se median
##    <chr>    <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl>
##  1 COVID_F… Democrat         Acc_Abs     53.3  13.1      30 2.39    56.6 
##  2 COVID_F… Democrat         Acc          3.13  0.536    30 0.0979   3.04
##  3 COVID_F… Democrat         Fam          2.07  0.246    30 0.0448   2.04
##  4 COVID_F… Republican       Acc_Abs     48.7  11.9      30 2.17    47.8 
##  5 COVID_F… Republican       Acc          3.31  0.452    30 0.0825   3.31
##  6 COVID_F… Republican       Fam          2.23  0.267    30 0.0488   2.22
##  7 Politic… Democrat         Acc_Abs     58.8  12.7      70 1.52    59.5 
##  8 Politic… Democrat         Acc          2.94  0.515    70 0.0615   2.92
##  9 Politic… Democrat         Fam          2.05  0.322    70 0.0385   2.02
## 10 Politic… Republican       Acc_Abs     56.7  14.1      70 1.68    58.7 
## 11 Politic… Republican       Acc          2.98  0.560    70 0.0670   2.90
## 12 Politic… Republican       Fam          2.01  0.289    70 0.0345   1.96
## # … with 2 more variables: min <dbl>, max <dbl>
# Basic histogram Absolute Accuracy
df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _False only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _False only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the categories (Political_True and _False)

c_df_political %>% group_by(Category, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 9
## # Groups:   Category [4]
##    Category       measurement  mean     SD count     se median   min   max
##    <chr>          <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
##  1 COVID_Fake     Acc_Abs     53.2  10.6      54 1.45    53.3  32.7  77.1 
##  2 COVID_Fake     Acc          3.14  0.429    54 0.0583   3.15  2.08  3.96
##  3 COVID_Fake     Fam          2.14  0.267    54 0.0364   2.08  1.52  2.84
##  4 COVID_True     Acc_Abs     68.3  10.1      92 1.05    68.7  42.9  84.8 
##  5 COVID_True     Acc          3.99  0.424    92 0.0442   4.02  2.95  4.81
##  6 COVID_True     Fam          2.55  0.433    92 0.0451   2.50  1.58  4.12
##  7 Political_Fake Acc_Abs     58.5  11.5     126 1.03    59.1  33.3  78.3 
##  8 Political_Fake Acc          2.93  0.459   126 0.0409   2.90  1.94  3.89
##  9 Political_Fake Fam          2.02  0.272   126 0.0243   2.01  1.29  2.75
## 10 Political_True Acc_Abs     64.6  10.7     134 0.923   65.8  42.9  87.0 
## 11 Political_True Acc          3.85  0.439   134 0.0380   3.86  2.88  4.82
## 12 Political_True Fam          2.46  0.412   134 0.0356   2.35  1.7   3.61
# Basic histogram Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items")

# Basic histogram Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "Grouped by all categories, collapsed acorss political leaning") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items") + facet_wrap(~Category)

# Basic histogram Relative Accuracy
c_df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and items \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: not at all; 6 extremely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the _True only

c_df_political_true %>% group_by(Category, political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 10
## # Groups:   Category, political_leaning [4]
##    Category political_leani… measurement  mean     SD count     se median
##    <chr>    <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl>
##  1 COVID_T… Democrat         Acc_Abs     71.7   8.35     46 1.23    73.8 
##  2 COVID_T… Democrat         Acc          4.19  0.376    46 0.0554   4.21
##  3 COVID_T… Democrat         Fam          2.66  0.455    46 0.0671   2.55
##  4 COVID_T… Republican       Acc_Abs     64.9  10.6      46 1.56    65.3 
##  5 COVID_T… Republican       Acc          3.80  0.378    46 0.0558   3.84
##  6 COVID_T… Republican       Fam          2.45  0.387    46 0.0570   2.42
##  7 Politic… Democrat         Acc_Abs     67.3  10.5      67 1.28    68.9 
##  8 Politic… Democrat         Acc          3.98  0.410    67 0.0501   4   
##  9 Politic… Democrat         Fam          2.49  0.459    67 0.0561   2.32
## 10 Politic… Republican       Acc_Abs     61.9  10.3      67 1.26    58.8 
## 11 Politic… Republican       Acc          3.73  0.434    67 0.0530   3.65
## 12 Politic… Republican       Fam          2.43  0.361    67 0.0441   2.36
## # … with 2 more variables: min <dbl>, max <dbl>
# Basic histogram Absolute Accuracy
c_df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _True only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
c_df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _True only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _True only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the Political_False only

c_df_political_false %>% group_by(Category, political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 10
## # Groups:   Category, political_leaning [4]
##    Category political_leani… measurement  mean     SD count     se median
##    <chr>    <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl>
##  1 COVID_F… Democrat         Acc_Abs     55.9   9.86     27 1.90    57.1 
##  2 COVID_F… Democrat         Acc          3.04  0.415    27 0.0799   3   
##  3 COVID_F… Democrat         Fam          2.04  0.223    27 0.0429   2.04
##  4 COVID_F… Republican       Acc_Abs     50.5  10.9      27 2.09    48.8 
##  5 COVID_F… Republican       Acc          3.24  0.424    27 0.0817   3.26
##  6 COVID_F… Republican       Fam          2.25  0.271    27 0.0521   2.25
##  7 Politic… Democrat         Acc_Abs     58.7  11.5      63 1.45    58.5 
##  8 Politic… Democrat         Acc          2.94  0.461    63 0.0581   2.93
##  9 Politic… Democrat         Fam          2.03  0.277    63 0.0348   2.02
## 10 Politic… Republican       Acc_Abs     58.2  11.6      63 1.46    59.3 
## 11 Politic… Republican       Acc          2.92  0.460    63 0.0580   2.86
## 12 Politic… Republican       Fam          2.00  0.269    63 0.0339   1.95
## # … with 2 more variables: min <dbl>, max <dbl>
# Basic histogram Absolute Accuracy
c_df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _False only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
c_df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For _False only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value, fill = Category)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For _False only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Item selection (politically true only)

all items, no familiarity thershold (political_true only)

#all familiarity
c_df_political_true %>% filter(measurement == "Fam") %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, all familiarity", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam <- c_df_political_true %>% filter(measurement == "Acc_Abs") %>% group_by(political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  70.9  8.70    79 0.979   72    45.1  85  
## 2 Democrat          Rep Favoured  64.8 11.1     34 1.91    66.0  44.6  86.3
## 3 Republican        Dem Favoured  61.2 10.1     79 1.13    58.5  42.9  87.0
## 4 Republican        Rep Favoured  67.5 10.2     34 1.74    67.6  42.9  84.8
accuracy_all_fam <- c_df_political_true %>% filter(measurement == "Acc_Abs") %>% group_by(Category, political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 8 x 10
## # Groups:   Category, political_leaning [4]
##   Category political_leani… Par_Combined  mean    SD count    se median
##   <chr>    <chr>            <fct>        <dbl> <dbl> <int> <dbl>  <dbl>
## 1 COVID_T… Democrat         Dem Favoured  73.3  7.64    32  1.35   75.3
## 2 COVID_T… Democrat         Rep Favoured  68.0  9.03    14  2.41   66.0
## 3 COVID_T… Republican       Dem Favoured  63.9 10.2     32  1.81   63.9
## 4 COVID_T… Republican       Rep Favoured  67.1 11.5     14  3.07   67.6
## 5 Politic… Democrat         Dem Favoured  69.3  9.09    47  1.33   70.6
## 6 Politic… Democrat         Rep Favoured  62.5 12.1     20  2.70   64.7
## 7 Politic… Republican       Dem Favoured  59.4  9.64    47  1.41   56.8
## 8 Politic… Republican       Rep Favoured  67.8  9.44    20  2.11   66.8
## # … with 2 more variables: min <dbl>, max <dbl>
#making table
# accuracy_all_fam_table <- accuracy_all_fam[1:4,-1]

accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223")) + facet_wrap(~Category)

Item selection (politically false only)

all items, no familiarity thershold (political_false only)

#all familiarity
c_df_political_false %>% filter(measurement == "Fam") %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, all familiarity", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam <- c_df_political_false %>% filter(measurement == "Acc_Abs") %>% group_by(political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  54.3 11.7     44  1.77   55.2  34.0  77.1
## 2 Democrat          Rep Favoured  61.3  9.30    46  1.37   60.1  41.9  78.3
## 3 Republican        Dem Favoured  60.9 10.5     44  1.58   61.6  42.2  78.1
## 4 Republican        Rep Favoured  51.2 11.2     46  1.66   53.3  32.7  73.5
accuracy_all_fam <- c_df_political_false %>% filter(measurement == "Acc_Abs") %>% group_by(Category, political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 8 x 10
## # Groups:   Category, political_leaning [4]
##   Category political_leani… Par_Combined  mean    SD count    se median
##   <chr>    <chr>            <fct>        <dbl> <dbl> <int> <dbl>  <dbl>
## 1 COVID_F… Democrat         Dem Favoured  54.8 14.1     12  4.08   52.8
## 2 COVID_F… Democrat         Rep Favoured  56.7  4.68    15  1.21   57.1
## 3 COVID_F… Republican       Dem Favoured  56.0 10.6     12  3.05   53.7
## 4 COVID_F… Republican       Rep Favoured  46.2  9.26    15  2.39   46.2
## 5 Politic… Democrat         Dem Favoured  54.1 11.0     32  1.94   55.2
## 6 Politic… Democrat         Rep Favoured  63.5 10.2     31  1.83   65.2
## 7 Politic… Republican       Dem Favoured  62.7 10.0     32  1.77   63.2
## 8 Politic… Republican       Rep Favoured  53.6 11.4     31  2.05   56.1
## # … with 2 more variables: min <dbl>, max <dbl>
accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223")) + facet_wrap(~Category)

#  final selection
# View(c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat"))

tmp <- c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat")

tmp <- rbind(tmp, c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Rep Favoured", political_leaning == "Democrat"))

tmp <- rbind(tmp, c_df_political_false %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat"))

tmp <- rbind(tmp, c_df_political_false %>% filter(measurement == "Fam", Par_Combined == "Rep Favoured", political_leaning == "Democrat"))

write_xlsx(
  tmp,
  path = "item_selection - review(1).xlsx",
  col_names = TRUE)

Partisian

# removing unnecessary columns
df_slim_leaning <- df[, c("Item #", "Category", "Image Name", "Headline Summary", "Par_Dem", "Par_Rep", "Par_Combined")]

#add whether the items are democratic favoured or republican favoured
df_slim_leaning$Par_Combined_Categ <- ifelse(df_slim_leaning$Par_Combined > 3.5, "Rep Favoured", "Dem Favoured")

# long format
df_slim_leaning_long <- gather(df_slim_leaning, key = "measurement", value = "value", -c("Item #", "Category", "Image Name", "Headline Summary", "Par_Combined_Categ"))

# adding political variable
df_slim_leaning_long$political_leaning <- "Democrat"

df_slim_leaning_long$political_leaning <- ifelse(str_detect(df_slim_leaning_long$measurement, "Rep") == TRUE, df_slim_leaning_long$political_leaning <- "Republican", df_slim_leaning_long$political_leaning <- "Democrat")

df_slim_leaning_long$political_leaning[str_detect(df_slim_leaning_long$measurement, "Combined")] <- "Combined"
df_slim_leaning_long$Par_Combined_Categ[str_detect(df_slim_leaning_long$measurement, "Combined")] <- "Combined"

df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Rep"), "")
df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Dem"), "")
df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Combined"), "")

#adding classes
df_slim_leaning_long$Par_Combined_Categ <- factor(df_slim_leaning_long$Par_Combined_Categ, levels = c("Dem Favoured", "Rep Favoured", "Combined"))

# df_slim_leaning_long <- df_slim_leaning_long %>% filter(Category == "Political_True" | Category == "Political_Fake")

# removing those high or low in accuracy 
# after identifying which items to remove now creating new corrected dfs
df_slim_leaning_long <- df_slim_leaning_long %>% filter(`Item #` %notin% index_remove_all)
df_slim_leaning_long %>% group_by(Category, political_leaning) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 12 x 9
## # Groups:   Category [4]
##    Category    political_leani…  mean    SD count     se median   min   max
##    <chr>       <chr>            <dbl> <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
##  1 COVID_Fake  Combined          3.54 0.359    27 0.0691   3.54  2.95  4.60
##  2 COVID_Fake  Democrat          3.32 0.387    27 0.0746   3.29  2.54  4.46
##  3 COVID_Fake  Republican        3.77 0.404    27 0.0777   3.83  3.1   4.73
##  4 COVID_True  Combined          3.23 0.412    46 0.0607   3.24  2.49  3.97
##  5 COVID_True  Democrat          2.89 0.378    46 0.0557   2.91  2.13  3.6 
##  6 COVID_True  Republican        3.57 0.527    46 0.0777   3.52  2.7   4.73
##  7 Political_… Combined          3.44 0.579    63 0.0730   3.34  2.26  4.50
##  8 Political_… Democrat          3.25 0.566    63 0.0713   3.24  2.12  4.3 
##  9 Political_… Republican        3.64 0.637    63 0.0803   3.6   2.19  4.82
## 10 Political_… Combined          3.23 0.529    67 0.0646   3.13  2.31  4.50
## 11 Political_… Democrat          2.98 0.524    67 0.0640   2.9   2.07  4.07
## 12 Political_… Republican        3.47 0.613    67 0.0749   3.39  2.17  5.15
# Basic histogram partisanship combined
df_slim_leaning_long %>% filter(political_leaning == "Combined") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Combined", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship combined facet
df_slim_leaning_long %>% filter(political_leaning == "Combined") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Combined", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship dems only
df_slim_leaning_long %>% filter(political_leaning == "Democrat") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Democrats Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship dems only facet
df_slim_leaning_long %>% filter(political_leaning == "Democrat") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Democrats Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship reps
df_slim_leaning_long %>% filter(political_leaning == "Republican") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Republicans Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship reps facet
df_slim_leaning_long %>% filter(political_leaning == "Republican") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Republicans Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,18)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram all partisanship factors
df_slim_leaning_long %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - All factors", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.